Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods


ODStorageUnitView

Superclasses
ODObject
Subclasses
none

An object of the ODStorageUnitView class provides thread-safe access to a storage unit by automatically focusing and locking the storage unit.

Description

A storage-unit view represents a particular storage unit, prefocused on a particular focus context. Your part creates a storage-unit view object by focusing a storage unit then calling the CreateView method (page 679) of that storage unit. You can pass the storage-unit view among your software components to give them access to the particular focused data stream.

A storage-unit view has most of the functionality of a storage unit, except that it has no methods for changing the focus. When you access a storage unit through a storage-unit view, however, the storage-unit view automatically locks the storage unit during the access and unlocks it afterward.

The storage-unit view has an associated storage-unit cursor that represents the focus context of the storage-unit view. You can call the GetCursor method (page 735) of a storage-unit view to obtain its storage-unit cursor. If you make changes to that storage-unit cursor, you change the focus context of the storage-unit view. Typically, however, parts do not change the focus context of a storage-unit view.

For more information related to storage units and storage-unit cursors, see the description of the classes ODStorageUnit (page 664) and ODStorageUnitCursor (page 716).

Methods

This section presents summary descriptions of the ODStorageUnitView methods grouped according to purpose, followed by detailed descriptions in alphabetical order.

Storage

CloneInto
Copies to the specified destination storage unit all properties and values of the storage unit that created this storage-unit view.
Externalize
Resolves all promises in the storage unit that created this storage-unit view and saves all its properties and values to persistent, external storage.
Internalize
Reads into memory all properties and values from the storage unit that created this storage-unit view.


Storage Unit Manipulation

GetStorageUnit
Returns a reference to the storage unit that created this storage-unit view.
AddProperty
Adds a property with the specified name to the storage unit that created this storage-unit view.
AddValue
Adds a value of the specified type to the focused property.
Remove
Removes all properties and values in the focus context from the storage unit that created this storage-unit view.
GetID
Returns the storage-unit ID for the storage unit that created this storage-unit view.
GetName
Returns the name of the storage unit that created this storage-unit view.
SetName
Sets the name of the storage unit that created this storage-unit view.
GetSize
Returns the size (number of bytes) of the data in the focus context.


Focus Context Access

GetCursor
Returns a reference to the storage-unit cursor representing the focus context of this storage-unit view.
GetProperty
Returns the name of the property in the focus context.


Value Manipulation

GetValue
Reads data from the focused value, starting at the offset (inclusive).
SetValue
Writes data to the focused value, starting at the offset (inclusive).
DeleteValue
Deletes data from the focused value, starting at the offset (inclusive).
InsertValue
Inserts data into the focused value, starting at the offset (inclusive).
GetOffset
Returns the offset of the focused value.
SetOffset
Sets the offset of the focused value.
GetType
Returns the type of the focused value.
SetType
Sets the type of the focused value.
GetGenerationNumber
Returns the generation number of the focused value.
IncrementGenerationNumber
Increments and returns the generation number of the focused value.


Persistent Reference Manipulation

GetIDFromStorageUnitRef
Returns the storage-unit ID of a referenced storage unit.
GetStrongStorageUnitRef
Creates a strong persistent reference to the specified storage unit.
GetWeakStorageUnitRef
Creates a weak persistent reference to the specified storage unit.
IsStrongStorageUnitRef
Returns a Boolean value that indicates whether the specified persistent reference is a strong persistent reference.
IsWeakStorageUnitRef
Returns a Boolean value that indicates whether the specified persistent reference is a weak persistent reference.
IsValidStorageUnitRef
Returns a Boolean value that indicates whether the specified persistent reference is valid.
RemoveStorageUnitRef
Makes a persistent reference invalid in the focused value.


Promise Manipulation

IsPromiseValue
Returns a Boolean value that indicates whether the focused value is a promise value.
GetPromiseValue
Reads promise data from the specified value of the focused property.
SetPromiseValue
Writes data to the specified value of the focused property, creating the value if it doesn't exist and making the value a promise value.


Creating Objects

CreateStorageUnitRefIterator
Creates a storage-unit reference iterator for the focused value.

Methods
AddProperty
AddValue
CloneInto
CreateStorageUnitRefIterator
DeleteValue
Externalize
GetCursor
GetGenerationNumber
GetID
GetIDFromStorageUnitRef
GetName
GetOffset
GetPromiseValue
GetProperty
GetSize
GetStorageUnit
GetStrongStorageUnitRef
GetType
GetValue
GetWeakStorageUnitRef
IncrementGenerationNumber
InsertValue
Internalize
IsPromiseValue
IsStrongStorageUnitRef
IsValidStorageUnitRef
IsWeakStorageUnitRef
Remove
RemoveStorageUnitRef
SetName
SetOffset
SetPromiseValue
SetType
SetValue

Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help